import request from "@/utils/request";

//查询库位物料储存列表
export function getwlList(query) {
  return request({
    url: "/storehouse/MaterialLocator/list",
    method: "get",
    params: query,
  });
}
// 查询仓位列表
export function getCkList(query) {
  return request({
    url: "/storehouse/position/list",
    method: "get",
    params: query,
  });
}
// 新增仓位
export function addCk(data) {
  return request({
    url: "/storehouse/position",
    method: "post",
    data: data,
  });
}

// 查询仓位信息
export function detailCk(id) {
  return request({
    url: "/storehouse/position/" + id,
    method: "get",
  });
}
// 修改仓位
export function updateCk(data) {
  return request({
    url: "/storehouse/position",
    method: "put",
    data: data,
  });
}
// 删除仓位
export function delCk(id) {
  return request({
    url: "/storehouse/position/" + id,
    method: "delete",
  });
}

// 查询库区列表

export function getKqList(query) {
  return request({
    url: "/storehouse/area/list",
    method: "get",
    params: query,
  });
}
// 新增库区
export function addKq(data) {
  return request({
    url: "/storehouse/area",
    method: "post",
    data: data,
  });
}

// 查询库区信息
export function detailKq(id) {
  return request({
    url: "/storehouse/area/" + id,
    method: "get",
  });
}
// 修改库区
export function updateKq(data) {
  return request({
    url: "/storehouse/area",
    method: "put",
    data: data,
  });
}
// 删除库区
export function delKq(id) {
  return request({
    url: "/storehouse/area/" + id,
    method: "delete",
  });
}

// 查询库位列表
export function getKwList(query) {
  return request({
    url: "/storehouse/locator/list",
    method: "get",
    params: query,
  });
}
// 新增库位
export function addKw(data) {
  return request({
    url: "/storehouse/locator",
    method: "post",
    data: data,
  });
}

// 查询库位信息
export function detailKw(id) {
  return request({
    url: "/storehouse/locator/" + id,
    method: "get",
  });
}
// 修改库位
export function updateKw(data) {
  return request({
    url: "/storehouse/locator",
    method: "put",
    data: data,
  });
}
// 删除库位
export function delKw(id) {
  return request({
    url: "/storehouse/locator/" + id,
    method: "delete",
  });
}

// 查询物料列表
export function getWlList(query) {
  return request({
    url: "/storehouse/MaterialLocator/list",
    method: "get",
    params: query,
  });
}
//查询物料信息下拉框  
export function getWlinfoList(query) {
  return request({
    url: "/base/material/list",
    method: "get",
    params: query,
  });
}
// 新增物料
export function addWl(data) {
  return request({
    url: "/storehouse/MaterialLocator",
    method: "post",
    data: data,
  });
}

// 查询物料信息
export function detailWl(id) {
  return request({
    url: "/storehouse/MaterialLocator/" + id,
    method: "get",
  });
}
// 修改物料
export function updateWl(data) {
  return request({
    url: "/storehouse/MaterialLocator",
    method: "put",
    data: data,
  });
}
// 删除物料
export function delWl(id) {
  return request({
    url: "/storehouse/MaterialLocator/" + id,
    method: "delete",
  });
}
